﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;


public class SceneCtl : MonoBehaviour {
    public GameObject m_Write, m_Exam,m_Export,m_Answer;
    public GameObject m_InfoWrite, m_InfoExam, m_InfoExport,m_InfoAnswer;
    public GameObject m_Single;
    private void Start() {
        int auth = PlayerPrefs.GetInt("Auth");
        if(auth != 1) {
            m_Write.SetActive(false);
            m_Exam.SetActive(false);
            m_Export.SetActive(false);
            m_InfoWrite.SetActive(false);
            //m_InfoExam.SetActive(false);
            //m_InfoExport.SetActive(false);

            m_Answer.SetActive(false);
            //m_InfoAnswer.SetActive(false);
        } else {
            m_Single.SetActive(false);
        }
    }

    public void OnClickWrite() {
        SceneManager.LoadScene("Write");
    }
    public void OnClickNewExam() {
        SceneManager.LoadScene("NewExam");
    }
    public void OnClickAnswer() {
        SceneManager.LoadScene("Answer");
    }
    public void OnClickExport() {
        SceneManager.LoadScene("Export");
    }
    public void OnClickLogout() {
        SceneManager.LoadScene("Login");
    }
}
